import { Module } from '@nestjs/common';
import { ServeStaticModule } from '@nestjs/serve-static';
import { join } from 'path';

import { AppController } from './app.controller';
import { AppService } from './app.service';
import { UploadController } from './upload/upload.controller';
import { UploadModule } from './upload/upload.module';
import { VideoController } from './video.controller';

@Module({
  imports: [
    UploadModule,
    // 可选：用于直接访问静态文件（如 HLS 输出）
    ServeStaticModule.forRoot({
      rootPath: join(__dirname, '..', 'uploads'),
    }),
  ],
  controllers: [AppController, VideoController, UploadController],
  providers: [AppService],
})
export class AppModule {}
